Technical Field
The present invention relates to a semiconductor device, and particularly to a semiconductor device that forms an analog-digital converter circuit.
Background Art
There are various types of analog-digital converter circuits (hereinafter referred to as “A/D converter circuits”), which are often classified into the parallel comparator type, the pipeline type, the sequential comparator type, and the delta-sigma type. Such types are selected according to the required sampling rate and resolution.
If, for example, a parallel comparator type A/D converter circuit, including a plurality of comparators that compare a plurality of reference voltages outputted by a resistor voltage divider with an input analog voltage, has a required resolution of n bits, then in general, there need to be 2n−1 comparators. If the required resolution is 10 bits, for example, then this would mean that 1023 comparators are needed, which increases the scale of the circuit.
The following technique for reducing the scale of a parallel comparator type A/D converter circuit is known, for example. Japanese Patent Application Laid-Open Publication No. 2003-229767, for example, discloses an A/D converter circuit including: a reference voltage source that generates a plurality of reference voltages; a plurality of comparators that are each provided so as to receive exclusive input of one of the plurality of reference voltages, the comparators comparing the inputted reference voltages with analog input; and an encoder that determines the voltage range where the analog input is present from among a plurality of voltage ranges in which the analog input might be present, on the basis of the output from the plurality of comparators, and digitally outputs the corresponding code. In such an A/D converter circuit, the operation of comparators corresponding to voltage regions that have a lower probability of the analog input being present therein than other voltage regions, among all voltage regions, is stopped, and such regions are designated as low resolution regions having a lower resolution than the other voltage regions.
Also, typical parallel comparator A/D converter circuits use a thermometer code. Bubble errors can occur in thermometer code due to offset variation in the comparator or the like. Thus, a circuit for correcting bubble errors is sometimes provided in A/D converter circuits. The following technique for correcting bubble errors is known.
Japanese Patent Application Laid-Open Publication No. H11-88174, for example, discloses an A/D converter circuit having an encoder including: an encoder circuit that detects a logical boundary in a thermometer code, thereby generating a gray code digital signal; and a gray/binary conversion circuit that converts the gray code outputted from the encoder circuit to a binary code digital signal. The encoder circuit includes: an error detection circuit that detects whether or not there is a specific relationship between the lower bit and the upper bit of the gray code, thereby detecting an error code included in the gray code; and an error correction circuit that corrects the error code detected by the error detection circuit.
Also, Japanese Patent Application Laid-Open Publication No. 2007-306302 discloses an A/D converter circuit having a digital averaging circuit that corrects errors in output results from the comparator by majority logic, a logical boundary detection circuit that detects the location of change in data outputted from the digital averaging circuit, and an encoder circuit that converts the data to binary code according to the output from the logical boundary detection circuit.